#include "precompile.h"

#include "TextItemPresentation.h"

#include "document/ITextItem.h"
#include "document/Types.h"

TextItemPresentation::TextItemPresentation()
{
}

TextItemPresentation::~TextItemPresentation()
{

}

void TextItemPresentation::Present(Graphics* graphics,PresentationContext& context)
{
	sys::InterfacePtr<ITextItem> pIFTextItem(context.GetTarget());
	
	Point orgin = pIFTextItem->Rectangle().LeftTop();
	graphics->DrawRectangle(Pen(Color::Red),pIFTextItem->Rectangle());
	graphics->DrawText(pIFTextItem->getText(),orgin);
}